package com.eian.boot.module.common.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * ID号段配置响应
 *
 * @author alex.meng
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "ID号段配置响应")
public class IdSegmentVO {

    @Schema(description = "业务类型标识", example = "order")
    private String bizType;

    @Schema(description = "当前已分配的最大ID", example = "0")
    private Long maxId;

    @Schema(description = "每次获取的步长", example = "1000")
    private Integer step;

    @Schema(description = "业务描述", example = "订单ID号段")
    private String description;

    @Schema(description = "版本号（乐观锁）", example = "0")
    private Integer version;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime modifiedAt;
}

